<template>
  <div>
      <div>
          <h3>图书详情信息</h3>
          <p v-for="i in books_list" :key="i.id">标题:{{i.title}}-----内容:{{i.content}}------作者{{i.author}}</p>
          

      </div>
  </div>
</template>

<script>
import axios from 'axios'
export default {
    data(){
        return{
            id:this.$route.query.id,
            books_list:[]
        }
    },created(){
        axios.post('http://127.0.0.1:8000/books',{'id':this.id}).then(resp=>{
            console.log(resp.data)
            this.books_list=resp.data
        }).catch(error=>{
            console.log(error)
        })
    }
}
</script>

<style>

</style>